//
//  NewSongViewController.m
//  Coco_Music
//
//  Created by 强哥 on 15/6/24.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "NewSongViewController.h"
#import "SCNavTabBarController.h"
#import "ChineseSongController.h"
#import "JSKSongController.h"
#import "AmericaSongController.h"

@interface NewSongViewController ()

@property(nonatomic,retain)ChineseSongController *Chinese;
@property(nonatomic,retain)JSKSongController *JSK;
@property(nonatomic,retain)AmericaSongController *America;



@end

@implementation NewSongViewController

-(void)dealloc
{
    [self.array release];
    [self.Chinese release];
    [self.JSK release];
    [self.America release];
    [super dealloc];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.Chinese = [[ChineseSongController alloc]init];
    self.Chinese.SongModle = [_array firstObject];
    self.Chinese.title = @"华语";
    self.JSK = [[JSKSongController alloc]init];
    self.JSK.title = @"日韩";
    self.JSK.SongModle = [_array objectAtIndex:1];
    self.America = [[AmericaSongController alloc]init];
    self.America.title = @"欧美";
    self.America.SongModle = [_array objectAtIndex:2];
    SCNavTabBarController *Scnav = [[SCNavTabBarController alloc]init];
    self.view.backgroundColor = [UIColor whiteColor];
    Scnav.subViewControllers = @[_Chinese,_America,_JSK];
    Scnav.Number = Scnav.subViewControllers.count;
    Scnav.showArrowButton = NO;
    Scnav.navTabBarColor = [UIColor clearColor];
    [Scnav addParentController:self];
    [_Chinese release];
    [_JSK release];
    [_America release];
    [Scnav release];
    
}

-(void)setArray:(NSMutableArray *)array
{
    if (_array!= array) {
        [_array release];
        _array = [array retain];
    }
    _Chinese.SongModle = [array objectAtIndex:0];
    _America.SongModle = [array objectAtIndex:1];
    _JSK.SongModle = [array objectAtIndex:2];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
